﻿#include<iostream>

using namespace std;
class Person
{
protected:
	string _name = "⼩李⼦"; // 姓名
	int _num = 111; // ⾝份证号
};
class Student : public Person
{
public:



	Student& operator=(const Student& s)

	{
		if (this != &s)
		{
			Person::operator = (s);
			_num = s._num;
			_name = s._name;
		}
		return *this;

	}

	Person* ptr = new Person;
	delete ptr;
	~Student()
	{

	}
	void Print()
	{
		cout << " 姓名:" << _name << endl;
		cout << " ⾝份证号:" << Person::_num << endl;
		cout << " 学号:" << _num << endl;
	}
protected:
	int _num = 999; // 学号
};


//Student(const char* name, int num,const char* address)
//{
//	:_name(name)
//	, _num(num)
//	, _address(address)
//	{
//
//	}
//}
int main()
{
	Student s1;
	s1.Print();
	return 0;
};

